//------------------------------------------------------------------------------
//  factory.cc
//  (C) 2006 Radon Labs GmbH
//------------------------------------------------------------------------------
#include "stdneb.h"
#include "addons/db/factory.h"
#include "addons/db/database.h"
#include "addons/db/command.h"
#include "addons/db/table.h"
#include "addons/db/dataset.h"
#include "addons/db/reader.h"
#include "addons/db/writer.h"
#include "addons/db/relation.h"
#include "addons/db/valuetable.h"

namespace Db
{
ImplementClass(Db::Factory, 'DBFC', Core::RefCounted);
ImplementSingleton(Db::Factory);

//------------------------------------------------------------------------------
/**
*/
Factory::Factory()
{
    ConstructSingleton;
}

//------------------------------------------------------------------------------
/**
*/
Factory::~Factory()
{
    DestructSingleton;
}

//------------------------------------------------------------------------------
/**
*/
Ptr<Database>
Factory::CreateDatabase() const
{
    n_error("Db::Factory::CreateDatabase() called!");
    return 0;
}

//------------------------------------------------------------------------------
/**
*/
Ptr<Command>
Factory::CreateCommand() const
{
    n_error("Db::Factory::CreateCommand() called!");
    return 0;
}

//------------------------------------------------------------------------------
/**
*/
Ptr<Table>
Factory::CreateTable() const
{
    n_error("Db::Factory::CreateTable() called!");
    return 0;
}

//------------------------------------------------------------------------------
/**
*/
Ptr<Dataset>
Factory::CreateDataset() const
{
    n_error("Db::Factory::CreateDataset() called!");
    return 0;
}

//------------------------------------------------------------------------------
/**
*/
Ptr<FilterSet>
Factory::CreateFilterSet() const
{
    n_error("Db::Factory::CreateFilterSet() called!");
    return 0;
}

//------------------------------------------------------------------------------
/**
*/
Ptr<Relation>
Factory::CreateRelation() const
{
    return Relation::Create();
}

//------------------------------------------------------------------------------
/**
*/
Ptr<ValueTable>
Factory::CreateValueTable() const
{
    return ValueTable::Create();
}

//------------------------------------------------------------------------------
/**
*/
Ptr<Reader>
Factory::CreateReader() const
{
    return Reader::Create();
}

//------------------------------------------------------------------------------
/**
*/
Ptr<Writer>
Factory::CreateWriter() const
{
    return Writer::Create();
}

} // namespace Db
